package com.ruoyi.ucar.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.UCarBaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;

/**
 * 产品对象 t_product
 * 
 * @author sungangbin
 * @date 2025-05-13
 */
@TableName("t_product")
@Data
public class TProduct extends UCarBaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @TableId(value="id",type = IdType.AUTO)
    private Long id;

    /** 产品表主键UUID */
    @Excel(name = "产品表主键UUID")
    @TableField("product_uuid")
    private String productUuid;

    /** 产品名称 */
    @Excel(name = "产品名称")
    @TableField("product_name")
    private String productName;

    /** 产品类型 */
    @Excel(name = "产品类型")
    @TableField("product_type")
    private String productType;

    /** 文件附件主表关联UUID */
    @Excel(name = "文件附件主表关联UUID")
    @TableField("file_main_uuid")
    private String fileMainUuid;

    /** 产品标准价格 */
    @Excel(name = "产品标准价格")
    @TableField("product_price")
    private BigDecimal productPrice;

    /** 产品进价 */
    @Excel(name = "产品进价")
    @TableField("product_purchasing_price")
    private BigDecimal productPurchasingPrice;

    /** 产品实收价格 */
    @Excel(name = "产品实收价格")
    @TableField("product_real_price")
    private BigDecimal productRealPrice;

    /** 产品返现价格 */
    @Excel(name = "产品返现价格")
    @TableField("product_return_price")
    private BigDecimal productReturnPrice;

    @Excel(name = "产品代理费")
    @TableField("product_agency_fee")
    private BigDecimal productAgencyFee;

    /** 金钱计量单位-¥ */
    @Excel(name = "金钱计量单位-¥")
    @TableField("money_unit")
    private String moneyUnit;

    /** 返现有限期（天） */
    @Excel(name = "返现有限期", readConverterExp = "天")
    @TableField("return_price_days")
    private Long returnPriceDays;

    /** 状态：0：下线 1：上线 */
    @Excel(name = "状态：0：下线 1：上线")
    @TableField("product_status")
    private Long productStatus;

    /** 库存次数 */
    @Excel(name = "库存次数")
    @TableField("store_number")
    private Long storeNumber;

    /** 已用次数 */
    @Excel(name = "已用次数")
    @TableField("used_number")
    private Long usedNumber;

    /** 累计次数 */
    @Excel(name = "累计次数")
    @TableField("total_number")
    private Long totalNumber;

    /** 创建人 */
    @Excel(name = "创建人")
    @TableField("created_by")
    private String createdBy;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("created_time")
    private Date createdTime;

    /** 更新人 */
    @Excel(name = "更新人")
    @TableField("updated_by")
    private String updatedBy;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("updated_time")
    private Date updatedTime;

    /** 删除标志 */
    @Excel(name = "删除标志")
    @TableField("delete_flag")
    private Long deleteFlag;


    /** 备注 */
    @Excel(name = "备注")
    @TableField("remark")
    private String remark;

    /** 固定数据标志 */
    @Excel(name = "固定数据标志")
    @TableField("fix_flag")
    private Integer fixFlag;

    /** 排序数字 */
    @Excel(name = "排序数字")
    @TableField("sort_number")
    private Integer sortNumber;

    @Excel(name = "二级代理费占比")
    @TableField("second_agency_fee_ratio")
    private Integer secondAgencyFeeRatio;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("productUuid", getProductUuid())
            .append("productName", getProductName())
            .append("productType", getProductType())
            .append("fileMainUuid", getFileMainUuid())
            .append("productPrice", getProductPrice())
            .append("productPurchasingPrice", getProductPurchasingPrice())
            .append("productRealPrice", getProductRealPrice())
            .append("productReturnPrice", getProductReturnPrice())
            .append("productAgencyFee", getProductAgencyFee())
            .append("moneyUnit", getMoneyUnit())
            .append("returnPriceDays", getReturnPriceDays())
            .append("productStatus", getProductStatus())
            .append("storeNumber", getStoreNumber())
            .append("usedNumber", getUsedNumber())
            .append("totalNumber", getTotalNumber())
            .append("createdBy", getCreatedBy())
            .append("createdTime", getCreatedTime())
            .append("updatedBy", getUpdatedBy())
            .append("updatedTime", getUpdatedTime())
            .append("deleteFlag", getDeleteFlag())
            .append("remark", getRemark())
                .append("fixFlag", getFixFlag())
                .append("sortNumber", getSortNumber())
                .append("secondAgencyFeeRatio", getSecondAgencyFeeRatio())
                .toString();
    }
}
